<?php
require_once 'Response.php';
require_once 'DB.php';
header('Content-Type:text/json;charset=utf-8');
# 设置允许跨域
header("Access-Control-Allow-Origin: *");
//$username=empty($_REQUEST['username'])?'':$_REQUEST['username'];
//$password=empty($_REQUEST['pwd'])?'':$_REQUEST['pwd'];

$pdo = DB::getInstance()->connect();

$sql="select userorder.id, user.`name`,user.address, menu.name as teaname,userorder.time  from userorder,user,menu where userorder.user_id = user.id AND userorder.menu_id=menu.id ";
$stmt=$pdo->query($sql);
$user=$stmt->fetchall();
Response::json('200','success',$user);

